# Maintainer: David Runge <dave@sleepmap.de>
pkgname=jnoisemeter
pkgver=0.2.2
pkgrel=2
pkgdesc="Measure audio test signals and in particular noise signals"
arch=('loong64' 'x86_64')
url="https://kokkinizita.linuxaudio.org/linuxaudio/"
license=('GPL2')
groups=('pro-audio')
depends=('clthreads' 'clxclient' 'jack')
source=("https://kokkinizita.linuxaudio.org/linuxaudio/downloads/$pkgname-$pkgver.tar.bz2")
sha512sums=('f7a1af765cea9b600d1d5320fd4ec6bdbdd1d7df54c441bd12f0086ce6fb994b5050db4c9438ec189c234440d992a5acdca42dd3d2c588c934a5b4cec763ce21')

prepare() {
  cd "$pkgname-$pkgver"
  # remove optimization
  sed -e '/march=native/d' \
      -i source/Makefile
}

build() {
  cd "$pkgname-$pkgver/source"
  make
}

package() {
  cd "$pkgname-$pkgver/source"
  make PREFIX=/usr DESTDIR="$pkgdir/" install

  # doc
  install -vDm 644 ../{AUTHORS,README} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}

